package com.grandtech.insurance.common.core.tile;//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//


import com.google.protobuf.nano.*;

import java.io.IOException;

public interface VectorTile {
    public static final class Tile extends ExtendableMessageNano<Tile> {
        public static final int UNKNOWN = 0;
        public static final int POINT = 1;
        public static final int LINESTRING = 2;
        public static final int POLYGON = 3;
        private static volatile Tile[] _emptyArray;
        public Layer[] layers;

        public static Tile[] emptyArray() {
            if (_emptyArray == null) {
                Object var0 = InternalNano.LAZY_INIT_LOCK;
                synchronized (InternalNano.LAZY_INIT_LOCK) {
                    if (_emptyArray == null) {
                        _emptyArray = new Tile[0];
                    }
                }
            }

            return _emptyArray;
        }

        public Tile() {
            this.clear();
        }

        public Tile clear() {
            this.layers = Layer.emptyArray();
            this.unknownFieldData = null;
            this.cachedSize = -1;
            return this;
        }

        public void writeTo(CodedOutputByteBufferNano output) throws IOException {
            if (this.layers != null && this.layers.length > 0) {
                for (int i = 0; i < this.layers.length; ++i) {
                    Layer element = this.layers[i];
                    if (element != null) {
                        output.writeMessage(3, element);
                    }
                }
            }

            super.writeTo(output);
        }

        protected int computeSerializedSize() {
            int size = super.computeSerializedSize();
            if (this.layers != null && this.layers.length > 0) {
                for (int i = 0; i < this.layers.length; ++i) {
                    Layer element = this.layers[i];
                    if (element != null) {
                        size += CodedOutputByteBufferNano.computeMessageSize(3, element);
                    }
                }
            }

            return size;
        }

        public Tile mergeFrom(CodedInputByteBufferNano input) throws IOException {
            while (true) {
                int tag = input.readTag();
                int i;
                Layer[] newArray;
                switch (tag) {
                    case 0:
                        return this;
                    case 26:
                        int arrayLength = WireFormatNano.getRepeatedFieldArrayLength(input, 26);
                        i = this.layers == null ? 0 : this.layers.length;
                        newArray = new Layer[i + arrayLength];
                        if (i != 0) {
                            System.arraycopy(this.layers, 0, newArray, 0, i);
                        }
                        break;
                    default:
                        if (this.storeUnknownField(input, tag)) {
                            continue;
                        }

                        return this;
                }

                while (i < newArray.length - 1) {
                    newArray[i] = new Layer();
                    input.readMessage(newArray[i]);
                    input.readTag();
                    ++i;
                }

                newArray[i] = new Layer();
                input.readMessage(newArray[i]);
                this.layers = newArray;
            }
        }

        public static Tile parseFrom(byte[] data) throws InvalidProtocolBufferNanoException {
            return  MessageNano.mergeFrom(new Tile(), data);
        }

        public static Tile parseFrom(CodedInputByteBufferNano input) throws IOException {
            return (new Tile()).mergeFrom(input);
        }

        public static final class Layer extends ExtendableMessageNano<Layer> {
            private static volatile Layer[] _emptyArray;
            private int bitField0_;
            public int version;
            public String name;
            public Feature[] features;
            public String[] keys;
            public Value[] values;
            private int extent_;

            public static Layer[] emptyArray() {
                if (_emptyArray == null) {
                    Object var0 = InternalNano.LAZY_INIT_LOCK;
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        if (_emptyArray == null) {
                            _emptyArray = new Layer[0];
                        }
                    }
                }

                return _emptyArray;
            }

            public int getExtent() {
                return this.extent_;
            }

            public Layer setExtent(int value) {
                this.extent_ = value;
                this.bitField0_ |= 1;
                return this;
            }

            public boolean hasExtent() {
                return (this.bitField0_ & 1) != 0;
            }

            public Layer clearExtent() {
                this.extent_ = 4096;
                this.bitField0_ &= -2;
                return this;
            }

            public Layer() {
                this.clear();
            }

            public Layer clear() {
                this.bitField0_ = 0;
                this.version = 1;
                this.name = "";
                this.features = Feature.emptyArray();
                this.keys = WireFormatNano.EMPTY_STRING_ARRAY;
                this.values = Value.emptyArray();
                this.extent_ = 4096;
                this.unknownFieldData = null;
                this.cachedSize = -1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano output) throws IOException {
                output.writeString(1, this.name);
                int i;
                if (this.features != null && this.features.length > 0) {
                    for (i = 0; i < this.features.length; ++i) {
                        Feature element = this.features[i];
                        if (element != null) {
                            output.writeMessage(2, element);
                        }
                    }
                }

                if (this.keys != null && this.keys.length > 0) {
                    for (i = 0; i < this.keys.length; ++i) {
                        String element = this.keys[i];
                        if (element != null) {
                            output.writeString(3, element);
                        }
                    }
                }

                if (this.values != null && this.values.length > 0) {
                    for (i = 0; i < this.values.length; ++i) {
                        Value element = this.values[i];
                        if (element != null) {
                            output.writeMessage(4, element);
                        }
                    }
                }

                if ((this.bitField0_ & 1) != 0) {
                    output.writeUInt32(5, this.extent_);
                }

                output.writeUInt32(15, this.version);
                super.writeTo(output);
            }

            protected int computeSerializedSize() {
                int size = super.computeSerializedSize();
                size += CodedOutputByteBufferNano.computeStringSize(1, this.name);
                int i;
                if (this.features != null && this.features.length > 0) {
                    for (i = 0; i < this.features.length; ++i) {
                        Feature element = this.features[i];
                        if (element != null) {
                            size += CodedOutputByteBufferNano.computeMessageSize(2, element);
                        }
                    }
                }

                if (this.keys != null && this.keys.length > 0) {
                    //i = 0;
                    int j = 0;
                    int dataSize = 0;
                    for (i = 0; i < this.keys.length; ++i) {
                        String element = this.keys[i];
                        if (element != null) {
                            ++j;
                            dataSize += CodedOutputByteBufferNano.computeStringSizeNoTag(element);
                        }
                    }

                    size += dataSize;
                    size += 1 * j;
                }

                if (this.values != null && this.values.length > 0) {
                    for (i = 0; i < this.values.length; ++i) {
                        Value element = this.values[i];
                        if (element != null) {
                            size += CodedOutputByteBufferNano.computeMessageSize(4, element);
                        }
                    }
                }

                if ((this.bitField0_ & 1) != 0) {
                    size += CodedOutputByteBufferNano.computeUInt32Size(5, this.extent_);
                }

                size += CodedOutputByteBufferNano.computeUInt32Size(15, this.version);
                return size;
            }

            public Layer mergeFrom(CodedInputByteBufferNano input) throws IOException {
                while (true) {
                    int tag = input.readTag();
                    int arrayLength;
                    int i;
                    Feature[] newArrayF;
                    switch (tag) {
                        case 0:
                            return this;
                        case 10:
                            this.name = input.readString();
                            continue;
                        case 18:
                            arrayLength = WireFormatNano.getRepeatedFieldArrayLength(input, 18);
                            i = this.features == null ? 0 : this.features.length;
                            newArrayF = new Feature[i + arrayLength];
                            if (i != 0) {
                                System.arraycopy(this.features, 0, newArrayF, 0, i);
                            }
                            break;
                        case 26:
                            arrayLength = WireFormatNano.getRepeatedFieldArrayLength(input, 26);
                            i = this.keys == null ? 0 : this.keys.length;
                            String[] newArrayS = new String[i + arrayLength];
                            if (i != 0) {
                                System.arraycopy(this.keys, 0, newArrayS, 0, i);
                            }

                            while (i < newArrayS.length - 1) {
                                newArrayS[i] = input.readString();
                                input.readTag();
                                ++i;
                            }

                            newArrayS[i] = input.readString();
                            this.keys = newArrayS;
                            continue;
                        case 34:
                            arrayLength = WireFormatNano.getRepeatedFieldArrayLength(input, 34);
                            i = this.values == null ? 0 : this.values.length;
                            Value[] newArrayV = new Value[i + arrayLength];
                            if (i != 0) {
                                System.arraycopy(this.values, 0, newArrayV, 0, i);
                            }

                            while (i < newArrayV.length - 1) {
                                newArrayV[i] = new Value();
                                input.readMessage(newArrayV[i]);
                                input.readTag();
                                ++i;
                            }

                            newArrayV[i] = new Value();
                            input.readMessage(newArrayV[i]);
                            this.values = newArrayV;
                            continue;
                        case 40:
                            this.extent_ = input.readUInt32();
                            this.bitField0_ |= 1;
                            continue;
                        case 120:
                            this.version = input.readUInt32();
                            continue;
                        default:
                            if (this.storeUnknownField(input, tag)) {
                                continue;
                            }

                            return this;
                    }

                    while (i < newArrayF.length - 1) {
                        newArrayF[i] = new Feature();
                        input.readMessage(newArrayF[i]);
                        input.readTag();
                        ++i;
                    }

                    newArrayF[i] = new Feature();
                    input.readMessage(newArrayF[i]);
                    this.features = newArrayF;
                }
            }

            public static Layer parseFrom(byte[] data) throws InvalidProtocolBufferNanoException {
                return (Layer) MessageNano.mergeFrom(new Layer(), data);
            }

            public static Layer parseFrom(CodedInputByteBufferNano input) throws IOException {
                return (new Layer()).mergeFrom(input);
            }
        }

        public static final class Feature extends ExtendableMessageNano<Feature> {
            private static volatile Feature[] _emptyArray;
            private int bitField0_;
            private long id_;
            public int[] tags;
            private int type_;
            public int[] geometry;

            public static Feature[] emptyArray() {
                if (_emptyArray == null) {
                    Object var0 = InternalNano.LAZY_INIT_LOCK;
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        if (_emptyArray == null) {
                            _emptyArray = new Feature[0];
                        }
                    }
                }

                return _emptyArray;
            }

            public long getId() {
                return this.id_;
            }

            public Feature setId(long value) {
                this.id_ = value;
                this.bitField0_ |= 1;
                return this;
            }

            public boolean hasId() {
                return (this.bitField0_ & 1) != 0;
            }

            public Feature clearId() {
                this.id_ = 0L;
                this.bitField0_ &= -2;
                return this;
            }

            public int getType() {
                return this.type_;
            }

            public Feature setType(int value) {
                this.type_ = value;
                this.bitField0_ |= 2;
                return this;
            }

            public boolean hasType() {
                return (this.bitField0_ & 2) != 0;
            }

            public Feature clearType() {
                this.type_ = 0;
                this.bitField0_ &= -3;
                return this;
            }

            public Feature() {
                this.clear();
            }

            public Feature clear() {
                this.bitField0_ = 0;
                this.id_ = 0L;
                this.tags = WireFormatNano.EMPTY_INT_ARRAY;
                this.type_ = 0;
                this.geometry = WireFormatNano.EMPTY_INT_ARRAY;
                this.unknownFieldData = null;
                this.cachedSize = -1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano output) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    output.writeUInt64(1, this.id_);
                }

                int dataSize;
                int i;
                int element;
                if (this.tags != null && this.tags.length > 0) {
                    dataSize = 0;

                    for (i = 0; i < this.tags.length; ++i) {
                        element = this.tags[i];
                        dataSize += CodedOutputByteBufferNano.computeUInt32SizeNoTag(element);
                    }

                    output.writeRawVarint32(18);
                    output.writeRawVarint32(dataSize);

                    for (i = 0; i < this.tags.length; ++i) {
                        output.writeUInt32NoTag(this.tags[i]);
                    }
                }

                if ((this.bitField0_ & 2) != 0) {
                    output.writeInt32(3, this.type_);
                }

                if (this.geometry != null && this.geometry.length > 0) {
                    dataSize = 0;

                    for (i = 0; i < this.geometry.length; ++i) {
                        element = this.geometry[i];
                        dataSize += CodedOutputByteBufferNano.computeUInt32SizeNoTag(element);
                    }

                    output.writeRawVarint32(34);
                    output.writeRawVarint32(dataSize);

                    for (i = 0; i < this.geometry.length; ++i) {
                        output.writeUInt32NoTag(this.geometry[i]);
                    }
                }

                super.writeTo(output);
            }

            protected int computeSerializedSize() {
                int size = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    size += CodedOutputByteBufferNano.computeUInt64Size(1, this.id_);
                }

                int dataSize;
                int i;
                int element;
                if (this.tags != null && this.tags.length > 0) {
                    dataSize = 0;

                    for (i = 0; i < this.tags.length; ++i) {
                        element = this.tags[i];
                        dataSize += CodedOutputByteBufferNano.computeUInt32SizeNoTag(element);
                    }

                    size += dataSize;
                    ++size;
                    size += CodedOutputByteBufferNano.computeRawVarint32Size(dataSize);
                }

                if ((this.bitField0_ & 2) != 0) {
                    size += CodedOutputByteBufferNano.computeInt32Size(3, this.type_);
                }

                if (this.geometry != null && this.geometry.length > 0) {
                    dataSize = 0;

                    for (i = 0; i < this.geometry.length; ++i) {
                        element = this.geometry[i];
                        dataSize += CodedOutputByteBufferNano.computeUInt32SizeNoTag(element);
                    }

                    size += dataSize;
                    ++size;
                    size += CodedOutputByteBufferNano.computeRawVarint32Size(dataSize);
                }

                return size;
            }

            public Feature mergeFrom(CodedInputByteBufferNano input) throws IOException {
                while (true) {
                    int tag = input.readTag();
                    int value;
                    int limit;
                    int arrayLength;
                    int startPos;
                    int i;
                    int[] newArray;
                    switch (tag) {
                        case 0:
                            return this;
                        case 8:
                            this.id_ = input.readUInt64();
                            this.bitField0_ |= 1;
                            continue;
                        case 16:
                            value = WireFormatNano.getRepeatedFieldArrayLength(input, 16);
                            limit = this.tags == null ? 0 : this.tags.length;
                            newArray = new int[limit + value];
                            if (limit != 0) {
                                System.arraycopy(this.tags, 0, newArray, 0, limit);
                            }
                            break;
                        case 18:
                            value = input.readRawVarint32();
                            limit = input.pushLimit(value);
                            arrayLength = 0;

                            for (startPos = input.getPosition(); input.getBytesUntilLimit() > 0; ++arrayLength) {
                                input.readUInt32();
                            }

                            input.rewindToPosition(startPos);
                            i = this.tags == null ? 0 : this.tags.length;
                            newArray = new int[i + arrayLength];
                            if (i != 0) {
                                System.arraycopy(this.tags, 0, newArray, 0, i);
                            }

                            while (i < newArray.length) {
                                newArray[i] = input.readUInt32();
                                ++i;
                            }

                            this.tags = newArray;
                            input.popLimit(limit);
                            continue;
                        case 24:
                            value = input.readInt32();
                            switch (value) {
                                case 0:
                                case 1:
                                case 2:
                                case 3:
                                    this.type_ = value;
                                    this.bitField0_ |= 2;
                                default:
                                    continue;
                            }
                        case 32:
                            value = WireFormatNano.getRepeatedFieldArrayLength(input, 32);
                            limit = this.geometry == null ? 0 : this.geometry.length;
                            newArray = new int[limit + value];
                            if (limit != 0) {
                                System.arraycopy(this.geometry, 0, newArray, 0, limit);
                            }

                            while (limit < newArray.length - 1) {
                                newArray[limit] = input.readUInt32();
                                input.readTag();
                                ++limit;
                            }

                            newArray[limit] = input.readUInt32();
                            this.geometry = newArray;
                            continue;
                        case 34:
                            value = input.readRawVarint32();
                            limit = input.pushLimit(value);
                            arrayLength = 0;

                            for (startPos = input.getPosition(); input.getBytesUntilLimit() > 0; ++arrayLength) {
                                input.readUInt32();
                            }

                            input.rewindToPosition(startPos);
                            i = this.geometry == null ? 0 : this.geometry.length;
                            newArray = new int[i + arrayLength];
                            if (i != 0) {
                                System.arraycopy(this.geometry, 0, newArray, 0, i);
                            }

                            while (i < newArray.length) {
                                newArray[i] = input.readUInt32();
                                ++i;
                            }

                            this.geometry = newArray;
                            input.popLimit(limit);
                            continue;
                        default:
                            if (this.storeUnknownField(input, tag)) {
                                continue;
                            }

                            return this;
                    }

                    while (limit < newArray.length - 1) {
                        newArray[limit] = input.readUInt32();
                        input.readTag();
                        ++limit;
                    }

                    newArray[limit] = input.readUInt32();
                    this.tags = newArray;
                }
            }

            public static Feature parseFrom(byte[] data) throws InvalidProtocolBufferNanoException {
                return (Feature) MessageNano.mergeFrom(new Feature(), data);
            }

            public static Feature parseFrom(CodedInputByteBufferNano input) throws IOException {
                return (new Feature()).mergeFrom(input);
            }
        }

        public static final class Value extends ExtendableMessageNano<Value> {
            private static volatile Value[] _emptyArray;
            private int bitField0_;
            private String stringValue_;
            private float floatValue_;
            private double doubleValue_;
            private long intValue_;
            private long uintValue_;
            private long sintValue_;
            private boolean boolValue_;

            public static Value[] emptyArray() {
                if (_emptyArray == null) {
                    Object var0 = InternalNano.LAZY_INIT_LOCK;
                    synchronized (InternalNano.LAZY_INIT_LOCK) {
                        if (_emptyArray == null) {
                            _emptyArray = new Value[0];
                        }
                    }
                }

                return _emptyArray;
            }

            public String getStringValue() {
                return this.stringValue_;
            }

            public Value setStringValue(String value) {
                if (value == null) {
                    throw new NullPointerException();
                } else {
                    this.stringValue_ = value;
                    this.bitField0_ |= 1;
                    return this;
                }
            }

            public boolean hasStringValue() {
                return (this.bitField0_ & 1) != 0;
            }

            public Value clearStringValue() {
                this.stringValue_ = "";
                this.bitField0_ &= -2;
                return this;
            }

            public float getFloatValue() {
                return this.floatValue_;
            }

            public Value setFloatValue(float value) {
                this.floatValue_ = value;
                this.bitField0_ |= 2;
                return this;
            }

            public boolean hasFloatValue() {
                return (this.bitField0_ & 2) != 0;
            }

            public Value clearFloatValue() {
                this.floatValue_ = 0.0F;
                this.bitField0_ &= -3;
                return this;
            }

            public double getDoubleValue() {
                return this.doubleValue_;
            }

            public Value setDoubleValue(double value) {
                this.doubleValue_ = value;
                this.bitField0_ |= 4;
                return this;
            }

            public boolean hasDoubleValue() {
                return (this.bitField0_ & 4) != 0;
            }

            public Value clearDoubleValue() {
                this.doubleValue_ = 0.0D;
                this.bitField0_ &= -5;
                return this;
            }

            public long getIntValue() {
                return this.intValue_;
            }

            public Value setIntValue(long value) {
                this.intValue_ = value;
                this.bitField0_ |= 8;
                return this;
            }

            public boolean hasIntValue() {
                return (this.bitField0_ & 8) != 0;
            }

            public Value clearIntValue() {
                this.intValue_ = 0L;
                this.bitField0_ &= -9;
                return this;
            }

            public long getUintValue() {
                return this.uintValue_;
            }

            public Value setUintValue(long value) {
                this.uintValue_ = value;
                this.bitField0_ |= 16;
                return this;
            }

            public boolean hasUintValue() {
                return (this.bitField0_ & 16) != 0;
            }

            public Value clearUintValue() {
                this.uintValue_ = 0L;
                this.bitField0_ &= -17;
                return this;
            }

            public long getSintValue() {
                return this.sintValue_;
            }

            public Value setSintValue(long value) {
                this.sintValue_ = value;
                this.bitField0_ |= 32;
                return this;
            }

            public boolean hasSintValue() {
                return (this.bitField0_ & 32) != 0;
            }

            public Value clearSintValue() {
                this.sintValue_ = 0L;
                this.bitField0_ &= -33;
                return this;
            }

            public boolean getBoolValue() {
                return this.boolValue_;
            }

            public Value setBoolValue(boolean value) {
                this.boolValue_ = value;
                this.bitField0_ |= 64;
                return this;
            }

            public boolean hasBoolValue() {
                return (this.bitField0_ & 64) != 0;
            }

            public Value clearBoolValue() {
                this.boolValue_ = false;
                this.bitField0_ &= -65;
                return this;
            }

            public Value() {
                this.clear();
            }

            public Value clear() {
                this.bitField0_ = 0;
                this.stringValue_ = "";
                this.floatValue_ = 0.0F;
                this.doubleValue_ = 0.0D;
                this.intValue_ = 0L;
                this.uintValue_ = 0L;
                this.sintValue_ = 0L;
                this.boolValue_ = false;
                this.unknownFieldData = null;
                this.cachedSize = -1;
                return this;
            }

            public void writeTo(CodedOutputByteBufferNano output) throws IOException {
                if ((this.bitField0_ & 1) != 0) {
                    output.writeString(1, this.stringValue_);
                }

                if ((this.bitField0_ & 2) != 0) {
                    output.writeFloat(2, this.floatValue_);
                }

                if ((this.bitField0_ & 4) != 0) {
                    output.writeDouble(3, this.doubleValue_);
                }

                if ((this.bitField0_ & 8) != 0) {
                    output.writeInt64(4, this.intValue_);
                }

                if ((this.bitField0_ & 16) != 0) {
                    output.writeUInt64(5, this.uintValue_);
                }

                if ((this.bitField0_ & 32) != 0) {
                    output.writeSInt64(6, this.sintValue_);
                }

                if ((this.bitField0_ & 64) != 0) {
                    output.writeBool(7, this.boolValue_);
                }

                super.writeTo(output);
            }

            protected int computeSerializedSize() {
                int size = super.computeSerializedSize();
                if ((this.bitField0_ & 1) != 0) {
                    size += CodedOutputByteBufferNano.computeStringSize(1, this.stringValue_);
                }

                if ((this.bitField0_ & 2) != 0) {
                    size += CodedOutputByteBufferNano.computeFloatSize(2, this.floatValue_);
                }

                if ((this.bitField0_ & 4) != 0) {
                    size += CodedOutputByteBufferNano.computeDoubleSize(3, this.doubleValue_);
                }

                if ((this.bitField0_ & 8) != 0) {
                    size += CodedOutputByteBufferNano.computeInt64Size(4, this.intValue_);
                }

                if ((this.bitField0_ & 16) != 0) {
                    size += CodedOutputByteBufferNano.computeUInt64Size(5, this.uintValue_);
                }

                if ((this.bitField0_ & 32) != 0) {
                    size += CodedOutputByteBufferNano.computeSInt64Size(6, this.sintValue_);
                }

                if ((this.bitField0_ & 64) != 0) {
                    size += CodedOutputByteBufferNano.computeBoolSize(7, this.boolValue_);
                }

                return size;
            }

            public Value mergeFrom(CodedInputByteBufferNano input) throws IOException {
                while (true) {
                    int tag = input.readTag();
                    switch (tag) {
                        case 0:
                            return this;
                        case 10:
                            this.stringValue_ = input.readString();
                            this.bitField0_ |= 1;
                            break;
                        case 21:
                            this.floatValue_ = input.readFloat();
                            this.bitField0_ |= 2;
                            break;
                        case 25:
                            this.doubleValue_ = input.readDouble();
                            this.bitField0_ |= 4;
                            break;
                        case 32:
                            this.intValue_ = input.readInt64();
                            this.bitField0_ |= 8;
                            break;
                        case 40:
                            this.uintValue_ = input.readUInt64();
                            this.bitField0_ |= 16;
                            break;
                        case 48:
                            this.sintValue_ = input.readSInt64();
                            this.bitField0_ |= 32;
                            break;
                        case 56:
                            this.boolValue_ = input.readBool();
                            this.bitField0_ |= 64;
                            break;
                        default:
                            if (!this.storeUnknownField(input, tag)) {
                                return this;
                            }
                    }
                }
            }

            public static Value parseFrom(byte[] data) throws InvalidProtocolBufferNanoException {
                return (Value) MessageNano.mergeFrom(new Value(), data);
            }

            public static Value parseFrom(CodedInputByteBufferNano input) throws IOException {
                return (new Value()).mergeFrom(input);
            }
        }
    }
}
